<template>
  <div class="list-box">
    <ul>
      <li class="task" v-for="task in taskList" v-bind:key="task.finishDate">
        {{ task.finishDate + ' ' + task.jobName + '任务已被完成，请立即审核'}}。
        <a class="btn-check" v-if="task.isPass==0"
           @click="$router.push({name: 'taskCheckDetail',params:{jobId:task.jobId,groupId: task.groupId,jobFinishedId: task.jobFinishedId}})">审核</a>
      </li>
      <li style="text-align: center" v-if="taskList.length===0">暂无数据</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'taskCheck',
  data () {
    return {
      taskList: [],
      pageNo: 1
    }
  },
  created () {
    this.getLogList()
  },
  methods: {
    getLogList: function () {
      this.$http.get('/server/job/getAllUnreviewdedJobs')
        .then(function (res) {
          this.taskList = res.data.data
        })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .list-box{
    line-height: 25px;
    color: #000;
    font-size: 12px;
  }
  .task{
    position: relative;
    padding-right: 50px;
    box-sizing: border-box;
  }
  .btn-check{
    position: absolute;
    top:0;
    right: 0;
    padding: 0 10px;
    line-height: 20px;
    z-index: 4;
    background: #F36707;
    border-radius: 5px;
  }
</style>
